//
//  BVMyAddressViewController.m
//  BuyVegetable
//
//  Created by yushanchang on 16/10/4.
//  Copyright © 2016年 com.yinding. All rights reserved.
//

#import "BVMyAddressViewController.h"
#import "BVMyAddressCell.h"
#import "BVAddNewAddressViewController.h"
#define MYADDRESS_CELL_IDENTIFIER @"BVMyAddressCell"

@interface BVMyAddressViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation BVMyAddressViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"收获地址";
}
- (void)setTableView:(UITableView *)tableView{
    _tableView = tableView;
    [tableView registerNib:NIB_NAMED(MYADDRESS_CELL_IDENTIFIER) forCellReuseIdentifier:MYADDRESS_CELL_IDENTIFIER];
}

- (IBAction)addNewAddressClick:(id)sender {
    BVAddNewAddressViewController *addNew = [[BVAddNewAddressViewController alloc] init];
    
    [self.navigationController pushViewController:addNew animated:YES];
}
#pragma mark - 
#pragma mark - UITableViewDelegate,UITableViewDataSource>
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 110;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    BVMyAddressCell *myAddressCell = [tableView dequeueReusableCellWithIdentifier:MYADDRESS_CELL_IDENTIFIER];
    return myAddressCell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
